<?php

namespace App\Http\Validate\Order;

use App\Http\Validate\BaseValidate;

/**
 * 销售子订单验证器
 */
class Saleordersub extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'add')
    {
        if ($doaction == 'add') {
            $this->rule = [
                'archive_name' => 'required',
            ];
            $this->message = [
                'archive_name.required' => '品名不能为空',
            ];
        } elseif ($doaction == 'edit') {
            $this->rule = [
            ];
            $this->message = [
                'archive_name.required' => '品名不能为空',
            ];
        }
    }
}
